<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>预约美容师</title>
	<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0, maximum-scale=1.0">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="telephone=no">
	<link type="text/css" rel="stylesheet" media="screen" href="__FONT__/css/style.css{$JSDEBUG}"/>
    <link type="text/css" rel="stylesheet" media="screen" href="__FONT__/css/media.css{$JSDEBUG}"/>
    <script type="text/javascript" src="__FONT__/js/jquery-1.9.1.min.js"></script>
    <script type="text/javascript">
    var selectBeauty = '{$beauty_id}';
	$(function(){
		function ArrayToURL(array) {
			var pairs = [];
			for (var key in array)
			if (array.hasOwnProperty(key))
				pairs.push(encodeURIComponent(key) + '=' + encodeURIComponent(array[key]));
			
			return pairs.join('&');
		}
		
		$(".btylistmain dd").click(function(){
			var _this = $(this);
			var beautician_id = $(this).parents('li').attr('data-id');
			
            $(".btylistmain dd h3 .unradio").removeClass('radio');
			$(this).children('h3').eq(0).children('label').addClass('radio');
			$(this).parent().parent().addClass('selected');
			$(this).parent().parent().siblings().removeClass('selected');
			
			 var parms = {
					 beautician_id:beautician_id,
					 beauty_id: selectBeauty
				};
			 
			 redirectUrl = '{:U("/ServiceItem/detail/id/".$serviceId)}' + '?' + ArrayToURL(parms);
				setTimeout(function () {
					window.location.href = redirectUrl;
				}, 1000);
		});
	});
	</script>
	<style>
		.selected{background:#eee !important;}
	</style>
</head>
<include file="Public/customHeader" title="预约美容师" url="javascript:history.go(-1);"/>
<header class="beautylist_head">
  <div class="btylisthead womenhead">
   <h1>隶属美容店：<span>{$beauty.name}</span></h1>
  </div>
</header>
<section class="beautylist_sec">
   <div>
   	<if condition="$list">
     <ul>
     <foreach name="list" item="beautician">
       <li data-id="{$beautician.id}" class="<eq name='beautician.id' value='$beautician_id'>selected</eq>">
         <div class="btylistmain womenmain">
           <h2>
           	<if condition="$beautician['profile_img']">
		       <img src="__UPLOADS__/Profile/{$beautician.profile_img}">
		       <else />
		       <img src="__FONT__/images/defaultProfile.png">
		       </if></h2>
           <dd>
             <h3><span>{$beautician.name}</span><label class="unradio <eq name='beautician.id' value='$beautician_id'>radio</eq>"></label></h3>
             <h3><if condition="$beautician['start']">
             		<for start="0" end="$beautician['start']"><i></i></for>
             	</if></h3>
             <h3><strong>服务次数：<b>{$beautician.service_total}</b></strong><strong>评论：<b>{$beautician.comment_total}</b></strong></h3>
           </dd>
         </div>
       </li>
       </foreach>
     </ul>
     <if condition="$hasMore">
     <input type="button" value="查看更多" class="btn beautyshibtn">
     </if>
     <else/>
     <div class="no_bank"><h1>美滴滴</h1><p>没有可选美容师~</p></div>
     </if>
   </div>
</section>
</body>
</html>